﻿using System.Diagnostics.CodeAnalysis;
using System.IO;
using CommandLineParser.Arguments;

namespace ZenWplExporter
{
	/// <summary>
	/// Defines command-line arguments
	/// </summary>
	[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses",
		Justification = "False positive. This class is used in Program.cs.")]
	internal class Arguments
	{
		/// <summary>
		/// Gets or sets a value indicating whether the files on ZEN device are organized by album and artist.
		/// </summary>
		/// <value><c>true</c> if organize; otherwise, <c>false</c>.</value>
		[SwitchArgument('o', "organized", false,
			Description = "Indicates that files on ZEN device are organized by album and artist.")]
		public bool Organize { get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether an existing playlist on ZEN device can be replaced.
		/// </summary>
		/// <value><c>true</c> if overwrite; otherwise, <c>false</c>.</value>
		[SwitchArgument('r', "replace", false,
			Description = "Indicates that an existing playlist on ZEN device should be replaced.")]
		public bool Overwrite { get; set; }

		/// <summary>
		/// Gets or sets full path to the Music folder on ZEN device.
		/// </summary>
		/// <value>The zen music dir.</value>
		[DirectoryArgument('m', "musicdir", DirectoryMustExist = true, Optional = false,
			Description = "Full path to Music folder on ZEN device (e.g. F:\\Music).")]
		public DirectoryInfo ZenMusicDir { get; set; }

		/// <summary>
		/// Gets or sets full path to the Playlist folder on ZEN device.
		/// </summary>
		/// <value>The zen playlist dir.</value>
		[DirectoryArgument('p', "playlistdir", DirectoryMustExist = true, Optional = false,
			Description = "Full path to Playlist folder on ZEN device (e.g. F:\\Playlist).")]
		public DirectoryInfo ZenPlaylistDir { get; set; }

		/// <summary>
		/// Gets or sets the path to Windows Playlist file (WPL).
		/// </summary>
		/// <value>The WPL path.</value>
		[FileArgument('w', "winplaylist", FileMustExist = true, Optional = false,
			Description = "Full path to Windows Playlist (WPL) file to export. Paths with spaces must be double quoted.")]
		public FileInfo WplPath { get; set; }
	}
}